<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Function template float_sort</title>
<link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../index.html" title="Boost.Sort">
<link rel="up" href="../../../boost_sort_c___reference.html#header.boost.sort.spreadsort.float_sort_hpp" title="Header &lt;boost/sort/spreadsort/float_sort.hpp&gt;">
<link rel="prev" href="float_mem_cast.html" title="Function template float_mem_cast">
<link rel="next" href="float_sort_idm1798.html" title="Function template float_sort">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="float_mem_cast.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../boost_sort_c___reference.html#header.boost.sort.spreadsort.float_sort_hpp"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="float_sort_idm1798.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.sort.spreadsort.float_sort_idm1775"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Function template float_sort</span></h2>
<p>boost::sort::spreadsort::float_sort</p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../../boost_sort_c___reference.html#header.boost.sort.spreadsort.float_sort_hpp" title="Header &lt;boost/sort/spreadsort/float_sort.hpp&gt;">boost/sort/spreadsort/float_sort.hpp</a>&gt;

</span>
<span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> RandomAccessIter<span class="special">&gt;</span> 
  <span class="keyword">void</span> <span class="identifier">float_sort</span><span class="special">(</span><span class="identifier">RandomAccessIter</span> first<span class="special">,</span> <span class="identifier">RandomAccessIter</span> last<span class="special">)</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="idm2060"></a><h2>Description</h2>
<p>\brief @c float_sort with casting to the appropriate size.

\param[in] first Iterator pointer to first element.
\param[in] last Iterator pointing to one beyond the end of data.
</p>
<p>Some performance plots of runtime vs. n and log(range) are provided:<br>
 <a href="../../../../../doc/graph/windows_float_sort.htm" target="_top">windows_float_sort</a> <br>
 <a href="../../../../../doc/graph/osx_float_sort.htm" target="_top">osx_float_sort</a></p>
<p><b>A simple example of sorting some floating-point is: </b></p>
<pre class="programlisting"><span class="identifier">vector</span><span class="special">&lt;</span><span class="keyword">float</span><span class="special">&gt;</span> <span class="identifier">vec</span><span class="special">;</span>
<span class="identifier">vec</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">1</span><span class="special">.</span><span class="number">0</span><span class="special">)</span><span class="special">;</span>
<span class="identifier">vec</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">2</span><span class="special">.</span><span class="number">3</span><span class="special">)</span><span class="special">;</span>
<span class="identifier">vec</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">1</span><span class="special">.</span><span class="number">3</span><span class="special">)</span><span class="special">;</span>
<span class="identifier">spreadsort</span><span class="special">(</span><span class="identifier">vec</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(</span><span class="special">)</span><span class="special">,</span> <span class="identifier">vec</span><span class="special">.</span><span class="identifier">end</span><span class="special">(</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
</pre>
<p> </p>
<p>
</p>
<p><b>The sorted vector contains ascending values "1.0 1.3 2.3". </b></p>
<p>
</p>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2014-2017 Steven
      Ross, Francisco Tapia, Orson Peters<p>
        Distributed under the <a href="http://boost.org/LICENSE_1_0.txt" target="_top">Boost
        Software License, Version 1.0</a>.
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="float_mem_cast.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../../boost_sort_c___reference.html#header.boost.sort.spreadsort.float_sort_hpp"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="float_sort_idm1798.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
